// 用于聊天室解析图片
function magPic(event) {
  var imgSrc = event.target.src
  console.log(imgSrc)
  var backDropEl = document.createElement("div");
  backDropEl.setAttribute('id', 'chat-backdrop');
  backDropEl.setAttribute('onclick', 'closeChatBdEl()');
  // 添加到body节点
  document.body.appendChild(backDropEl);
  var imgEl = document.createElement('img')
  imgEl.setAttribute('class', 'chat_img');
  imgEl.src = imgSrc
  var chatBdEl = document.getElementById("chat-backdrop");
  // 添加到遮罩节点下
  chatBdEl.appendChild(imgEl);
}

// 关闭聊天遮罩
function closeChatBdEl () {
  var chatBdEl = document.getElementById("chat-backdrop")
  chatBdEl.parentNode.removeChild(chatBdEl)
}